﻿<Window x:Class="Frontend.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:src="clr-namespace:Frontend"
    Title="Speakup Desktop Frontend" >
    <TabControl TabStripPlacement="Top" >
        <TabItem Header="Schedule">            
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"   />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <DockPanel Grid.Column="0">
                    <StatusBar DockPanel.Dock="Bottom" 
                               BorderBrush="Black" BorderThickness="1"
                               FontSize="11" MinHeight="30" 
                               Name="StatusBar">
                        <StatusBarItem>
                            Classes count:
                        </StatusBarItem>
                        <TextBlock Name="ClassCount" Text="?"/>
                        <TextBlock>
                            <TextBlock.Inlines>
                                <Hyperlink Click="ClearClasses_Click">(clear)</Hyperlink>
                            </TextBlock.Inlines>
                        </TextBlock>
                        <Separator/>
                        <StatusBarItem Name="RefreshStatusPanel" Visibility="Collapsed">
                            <StackPanel Orientation="Horizontal">
                                <Label>Refreshing:</Label>
                                <ProgressBar Margin="3,3" MinWidth="150" IsIndeterminate="True" />
                                <Button Padding="20,0"  Click="RefreshCancel_Click" Name="RefreshCancelButton" VerticalAlignment="Center">Cancel</Button>
                            </StackPanel>
                        </StatusBarItem>

                    </StatusBar>
                    <src:TimeSheet  x:Name="ClassTimeSheet" />
                </DockPanel>
                
                <ScrollViewer Grid.Column="1" MinWidth="200" MaxWidth="250"
                              HorizontalScrollBarVisibility="Disabled"
                              VerticalScrollBarVisibility="Auto">
                    <StackPanel >
                        <src:ClassInfoPanel x:Name="ClassInfoPanel" ></src:ClassInfoPanel>
                        <Border BorderBrush="Black" BorderThickness="1" Margin="2">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                <Grid.Resources>
                                    <Style TargetType="StackPanel">
                                        <Setter Property="StackPanel.Orientation" Value="Horizontal" />
                                    </Style>
                                    <Style TargetType="TextBlock">
                                        <Setter Property="TextBlock.Margin" Value="2 2" />
                                    </Style>
                                </Grid.Resources>
                                <StackPanel Grid.Column="0" HorizontalAlignment="Center">
                                    <TextBlock>Unit</TextBlock>
                                    <TextBlock Name="CurrentUnitTextBlock" />
                                </StackPanel>
                                <StackPanel Grid.Column="1" HorizontalAlignment="Center">
                                    <TextBlock>Level</TextBlock>
                                    <TextBlock Name="CurrentLevelTextBlock"/>
                                </StackPanel>
                                <StackPanel Grid.Column="2" HorizontalAlignment="Center">
                                    <TextBlock>Week</TextBlock>
                                    <TextBlock Name="CurrentWeekTextBlock" />
                                </StackPanel>
                            </Grid>
                        </Border>
                        <src:LoginPanel x:Name="LoginPanel" Refresh="LoginPanel_Refresh" />
                        <src:ClassTypeFilterPanel  x:Name="ClassTypeFilterPanel"/>
                        <src:DateTimeFilterPanel  x:Name="DateTimeFilterPanel"/>
                        <src:LegendPanel  x:Name ="LegendPanel"
                                          AvailableBrush="{StaticResource AvailableBrush}"
                                          ReservedBrush="{StaticResource ReservedBrush}" 
                                          AvailableWaitListBrush="{StaticResource AvailableWaitListBrush}"
                                          ReservedWaitListBrush ="{StaticResource ReservedWaitListBrush}" />                    
                    
                    </StackPanel>
                </ScrollViewer>

                </Grid>
        </TabItem>
        
        <TabItem Header="Changed Classes">
            <src:TodoControl x:Name="TodoControl"/>
        </TabItem>        
        <TabItem Header="Themes">
                <src:ThemesControl x:Name="ThemesControl"/>
        </TabItem>
    </TabControl>     

</Window>
